package czy.demo.myfirstapp;

import android.support.v4.app.Fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

/* 主活动中包含的fragment */
public class MainActivityFragment extends Fragment {

    public MainActivityFragment() {}

    /**
     * Fragment创建生命周期方法
     * @param inflater
     * @param container:貌似为视图容器
     * @param savedInstanceState
     * @return
     */
    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        /* 设置Fragment的布局文件 */
        return inflater.inflate(R.layout.fragment_main, container, false);
    }
}
